package com.zqoffice;

import android.app.Application;
import android.util.Log;

import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

import com.example.user.androidintent.IntentPackage;
import cn.reactnative.modules.jpush.JPushPackage;
import com.imagepicker.ImagePickerPackage;
import android.content.Intent;
import com.chymtt.reactnativecalendar.CalendarPackage;
import com.github.xinthink.rnmk.ReactMaterialKitPackage;
import com.chymtt.reactnativedropdown.DropdownPackage;
import me.nucleartux.date.ReactDatePackage;
import com.rnfs.RNFSPackage;
import com.zqoffice.update.VersionCheckPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.pusherman.networkinfo.RNNetworkInfoPackage;


public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    protected boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new IntentPackage(),
        new JPushPackage(),
        new CalendarPackage(),
        new ReactMaterialKitPackage(),
        new DropdownPackage(),
        new ReactDatePackage(),
        new RNFSPackage(),
        new VersionCheckPackage(),
        new ImagePickerPackage(),
        new VectorIconsPackage(),
        new RNNetworkInfoPackage()

      );
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }
}
